#蛇.py
import turtle
turtle.setup(600,500,300,300)
turtle.penup()
turtle.fd(-60)
turtle.pendown()
turtle.pensize(10)
turtle.pencolor("green")
turtle.seth(60)
for i in range(6):
    turtle.circle(-40,40)
    turtle.circle(40,40)
turtle.right(120)
for i in range(6):
    turtle.circle(-40,40)
    turtle.circle(40,40)
turtle.right(120)
for i in range(6):
    turtle.circle(-40,40)
    turtle.circle(40,40)
turtle.left(110)
for i in range(4):
        turtle.circle(-40,40)
        turtle.circle(40,40)
turtle.right(40)
turtle.fd(100)
turtle.left(90)
turtle.fd(170)
turtle.left(90)
turtle.fd(100)
turtle.right(2)
for i in range(4):
        turtle.circle(-40,40)
        turtle.circle(40,40)


#正方形螺旋线.py
import turtle
turtle.setup(600,500,200,200)
turtle.penup()
turtle.fd(-220)
turtle.pendown()
turtle.pensize(5)
turtle.pencolor("green")
turtle.seth(60)
turtle.fd(400*2/3)
for i in range(2):
    turtle.right(120)
    turtle.fd(400)
turtle.right(120)
turtle.fd(400/3)
turtle.left(60)
turtle.fd(400/3)
for i in range(2):
    turtle.right(120)
    turtle.fd(400)
turtle.right(120)
turtle.fd(400*2/3)




#无边正方形.py
import turtle
turtle.setup(600,500,200,200)
turtle.penup()
turtle.fd(-30)
turtle.pendown()
turtle.pensize(5)
turtle.pencolor("blue")
turtle.seth(0)
for i in range(4):
    turtle.penup()
    turtle.fd(40)
    turtle.pendown()
    turtle.pensize(5)
    turtle.fd(50)
    turtle.penup()
    turtle.fd(40)
    turtle.left(90)


#叠加等边三角形.py
import turtle
turtle.penup()
turtle.fd(-50)
turtle.pendown()
turtle.pensize(6)
turtle.pencolor("black")
turtle.seth(60)
turtle.fd(300/2)
for i in range(2):
    turtle.right(120)
    turtle.fd(300)
turtle.right(120)
turtle.fd(300/2)
turtle.right(60)
turtle.fd(300/2)
for i in range(2):
    turtle.right(120)
    turtle.fd(300/2)

#太极.py
import turtle
turtle.setup(800,800,600,600)
turtle.penup()
turtle.fd(-300)
turtle.pendown()
turtle.pencolor('black')
turtle.pensize(5)
turtle.seth(0)
from turtle import *
fillcolor("black")
begin_fill()
turtle.circle(200,180)
turtle.circle(100,180)
turtle.circle(-100,180)
end_fill()
turtle.circle(-200,180)
turtle.penup()
from turtle import *
fillcolor("white")
begin_fill()
turtle.right(90)
turtle.fd(100)
turtle.pendown()
turtle.circle(30)
end_fill()
from turtle import *
fillcolor("black")
begin_fill()
turtle.penup()
turtle.fd(200)
turtle.pendown()
turtle.circle(30)
end_fill()




#2的几次方.py
a=eval(input("想计算2的几次方："))
print(pow(2,a)



#三位数的各位.py
a=eval(input("输入一个三位数："))
x=a//100
y=(a-x*100)//10
z=a%10
print("该数的百位为：{}".format(x))
print("该数的十位为：{}".format(y))
print("该数的各位为：{}".format(z))
